<?php
/* 
 * ********* CVS HEADER ********* 
 * 
 * $RCSfile: admuppathsupp.php,v $ 
 * $Date: 2005/08/29 15:28:46 $ 
 * $Revision: 1.2 $ 
 * 
 * ********* CVS HEADER ********* 
 */
if($action=="process"){
    $query="DELETE FROM rportal_upload_path WHERE id='$pathid'";
    @rportalrequete($query) or die ("ERREUR<br>$query");
    header("Location: ?op=admuppathliste");
    exit;
}
$query="SELECT id,path FROM rportal_upload_path WHERE id='$pathid'";
$result=rportalrequete($query) or die ("ERREUR<br>$query");
if($row=rportalligne($result)){
    require_once("module/TPLN/TPLN.php"); 
    $TPLN = new TPLN; 
    $TPLN->Open($op_basepath."tpl/admuppathsupp.html"); 
    $TPLN->IncludeFile("header","environnement/$session[environnement]/header.php"); 
    $TPLN->IncludeFile("footer","environnement/$session[environnement]/footer.php");
    $TPLN->Parse("path",$row['path']); 
    $TPLN->Parse("supp","?op=admuppathsupp&action=process&pathid=".$row['id']);
    $TPLN->Parse("retour","?op=admuppathliste");
    $TPLN->Write(); 
} else {
    header("Location: ?op=admuppathliste");
    exit;
}
?>